let code = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM123456789'

const yanzheng = (n, m) => {
    n = Number(n)
    m = Number(m)
    if (n > m) {
        var temp = n
        n = m
        m = temp
    }
    return Math.floor(Math.random() * (m - n) + n)
}
const numFn = () => {
    let num = ''
    for (let i = 0; i < 6; i++) {
        var ran = yanzheng(0, 62)
        num += code.charAt(ran)
    }
    return num.toLowerCase()
}
module.exports = { yanzheng, numFn }